import request from '@/utils/request';

// 获取预警通知列表

export function getNoticeList(data: any) {
  return request({
    url: '/system/warnRuleNotifyUser/list',
    method: 'GET',
    params: data
  });
}

// 获取预警通知详情
export function getNoticeDetail(id: any) {
  return request({
    url: '/system/warnRuleNotifyUser/' + id,
    method: 'GET'
  });
}

// 添加预警通知
export function addNotice(data: any) {
  return request({
    url: '/system/warnRuleNotifyUser',
    method: 'POST',
    data: data
  });
}

// 修改预警通知
export function updateNotice(data: any) {
  return request({
    url: '/system/warnRuleNotifyUser',
    method: 'PUT',
    data: data
  });
}   

// 删除预警通知
export function deleteNotice(id: any) {
  return request({
    url: '/system/warnRuleNotifyUser/' + id,
    method: 'DELETE'
  });
}

// 发布预警通知
export function publishNotice(id: any) {
  return request({
    url: '/system/warnRuleNotifyUser/publish/' + id,
    method: 'GET',
  });
}

